package study.springcloud.client.rest.support;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.ribbon.RibbonClientSpecification;

import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.List;

@Slf4j
@EnableDiscoveryClient
@SpringBootApplication(scanBasePackages = "study.springcloud.client.rest")
public class SpringBootCfg {

    @Autowired(required = false)
    private List<RibbonClientSpecification> configurations = new ArrayList<>();

    @PostConstruct
    public void init() {
        configurations.forEach(e -> {
            log.info(">>>>>>>>>> {}", e.getName());
        });
    }
}
